<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="UTF-8">
		<title>用户列表</title>
	</head>
	<body>
		<center>
			<h1>用户列表</h1>
			<table border="1">
				<tr>
					<td>用户名</td>
					<td>密码</td>
					<td>昵称</td>
					<td>年龄</td>
				</tr>
				<!-- 
					//1先从Context中获取到我们放进去的List集合
					//2根据集合元素个数循环生成<tr>
				for(Map user : ctx.get("users")){ -->
				<tr th:each="user:${users}">
					<td th:text="${user.username}">张三</td>
					<td th:text="${user.password}">123456</td>
					<td th:text="${user.nickname}">阿三</td>
					<td th:text="${user.age}">22</td>
				</tr>
				<!-- } -->
				<tr th:remove="all">
					<td>李四</td>
					<td>666666</td>
					<td>尼古拉斯阿四</td>
					<td>25</td>
				</tr>					
			</table>
		</center>
	</body>
</html>






